package gob.pe.inei.esvit.bll.servicio.adm;

import gob.pe.inei.esvit.bll.dsl.adm.ADMMVariableDSL;
import gob.pe.inei.esvit.dal.dao.adm.ADMMVariableDAO;
import gob.pe.inei.esvit.ebl.entity.adm.ADMMVariable;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component(value = "ADMMVariableDSL")
public class ADMMVariableDSLImpl implements ADMMVariableDSL {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Autowired
	@Resource
	private ADMMVariableDAO variableDAO;

	public void setVariableDAL(ADMMVariableDAO variableDAO) {
		this.variableDAO = variableDAO;
	}

	public List<ADMMVariable> findAll() {
		return variableDAO.findAll(ADMMVariable.class);
	}

	public void save(ADMMVariable entidad) {
		variableDAO.insert(entidad);
	}

	public List<ADMMVariable> findAllByExample(ADMMVariable variable) {
		return variableDAO.findAllByExample(ADMMVariable.class, variable);
	}
}
